import {defineConfig} from 'vite'
import vue from '@vitejs/plugin-vue'
import {resolve} from 'path'
// https://vite.dev/config/
export default defineConfig({
    base: "/",
    envDir: "env",
    envPrefix: ['VITE_'],
    plugins: [vue()],
    resolve: {
        alias: [
            {
                find: '@',
                replacement: resolve(__dirname, "src"),
            }
        ]
    },
    server: {
        host: '0.0.0.0',
        port: 1000,
        proxy: {
            '/Api': {
                target: 'http://119.45.164.254/7777Api/api',
                changeOrigin: true,
                rewrite: path => path.replace(/^\/Api/, '')
            }
        },
    }
})
